<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> -->
    <meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
    <!-- <script src="../static/vconsole.min.js"></script>
    <script>
      var vConsole = new VConsole();
      console.log('Hello world');
    </script> -->


    <script>
       function exit(){
          console.log('exit')
          localStorage.clear();
          
          let params = {
            userid:document.getElementById('select').value,
          };
          // this.$refs.loginForm.submit()
          Axios.Post(
            CommonRouter.login.url,
            params
          ).then(function(res){
              if (res.data.status === 1) {
                  var token = res.data.token;
                  localStorage.setItem('token',token);
                  localStorage.setItem('username',res.data.datas.user.username);
                  localStorage.setItem('userid',res.data.datas.user.userid);
                  
                  location.reload();

                  // self.$router.push('/employeeServ?emplid='+id);
                //   location.href = '/module/leader.html?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxMDAwMDM5Iiwic3ViIjoiYzEwMDcxMDciLCJpc3MiOiJXWFAiLCJleHAiOjE1MTE5NTE4MTR9.hZtbkhE8S6_rqmOJk2pXFvqVelCDtdv58fg2UqeKYNg';
              } else {
                // if (res.data.datas.count >= 3) {
                //   self.ishidecode = true;
                // }
                // self.checkImgEve();
              }
          }).catch(function(err){
              console.log(err);
              // location.reload();
          })
       }
    </script>
    <script>
        window.onload=function(){
          document.getElementById('select').value = localStorage.getItem('userid') || '';
        }
    </script>
    <style>
      .exit{
          position: fixed;
          bottom: 259px;
           z-index:12000;
           left: -56px;
          height: 30px;
          color:#fff;
          z-index:12000;
          text-align: center;
          line-height: 30px;
          font-weight: 600;
          width: 160px;
          border-radius: 10px;
          /* background-color: #04be02;
          border: solid 1px #000; */

      }
      #select{
          /*很关键：将默认的select选择框样式清除*/
          appearance:none;
          -moz-appearance:none;
          -webkit-appearance:none;
          height: 32px;
          width: 32px;
          line-height: 24px;
          border-radius: 50%;
          border: 1px solid #58cf28;
          background-color: #F9F9F9;
          color: #000;

      }
    </style>

    <title>关键岗名册</title>
  </head>
  <body>
    <div class="exit" >
      <select id="select" onchange="exit()" name="" id="">
            <option value="">切换用户</option>
            <option value="C1007101">刘一(集团主要领导)</option>
            <option value="C1007104">李四(二级公司主要领导)</option>
            <option value="C1007110">郑十(高管人事管理员)</option>
            <option value="C1007106">赵六(HR报表专员)</option>
            <option value="C1007107">孙七(普通员工)</option>
            <option value="C1007103">张三(普通员工)</option>
            <option value="C1007105">王五(普通员工)</option>
      </select>
    </div>
    <div id="app"></div>
    <!-- built files will be auto injected -->

  </body>

</html>
